<?php 
/**
 * 站点首页模板
 */
if(!defined('EMLOG_ROOT')) {exit('error!');} 
if($pageurl == Url::logPage()){
	include View::getView('index');
	exit;
}
?>
<div class="list_left col-md-9 col-xs-12">
	<h3 class="list_title"><i class="fa fa-paper-plane-o"></i>
    <?php 
     //父分类和子分类
     $ery = mysql_query("SELECT * FROM ".DB_PREFIX."sort WHERE sid ='$sortid'"); $rest = mysql_fetch_array($ery); if($rest['pid'] == "0"){
   echo $rest['sortname']; 
  }else{
  $ery1 = mysql_query("SELECT * FROM ".DB_PREFIX."sort WHERE sid ='".$rest['pid']."'");  echo $rest['sortname'];}
    ?>列表</h3>
	<ul class="list_ul clearfix">
<?php 
if (!empty($logs)):
foreach($logs as $value): 
?>
	<li class="col-xs-12 clearfix">
		<a <?php doAction(diytitle_list,$value['logid']); ?> title="<?php echo $value['log_title']; ?>"  href="<?php echo $value['log_url']; ?>" target="_blank">	
			<div class="lists_right_title"><span class="sort_style">[<?php $sortRes = mysql_query("SELECT * FROM ".DB_PREFIX."sort WHERE sid ='".$value['sortid']."'"); $sortname = mysql_fetch_array($sortRes);echo $sortname['sortname']; ?>] </span><?php echo $value['log_title']; ?></div>
			<div class="lists_right_date"><span><?php echo gmdate('n-j', $value['date']); ?></span></div>
		</a>
	</li>
<?php 
endforeach;
?>
</ul>
<?php
else:
?>
	<h3>未找到</h3>
	<p>抱歉，没有符合您查询条件的结果。</p>
<?php endif;?>
<div class="pagenavi">
	<?php echo $page_url;?>
</div>
</div>
<div class="aside col-xs-3">
  <?php
  include View::getView('side');
  ?>
</div>
<?php
include View::getView('footer');
?>